package com.coderush.admin.sys.mapper;

import com.coderush.admin.sys.model.dto.MenuAssignDto;
import com.coderush.admin.sys.model.entity.RoleMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
* @author Administrator
* @description 针对表【sys_role_menu(角色和菜单)】的数据库操作Mapper
* @createDate 2025-08-29 16:36:40
* @Entity com.coderush.admin.sys.model.entity.RoleMenu
*/
public interface RoleMenuMapper extends BaseMapper<RoleMenu> {

    /**
     * 根据角色id查询菜单id
     * @param roleIds
     * @return
     */
    List<Long> findByRoleIds(List<Long> roleIds);

    /**
     * 根据角色id删除角色和菜单关系
     * @param roleId
     */
    void deleteByRoleId(Long roleId);

    void doAssign(MenuAssignDto menuAssignDto);
}




